Integrand size = 23, antiderivative size = 66 \[ \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {\arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} \sqrt {b} d}+\frac {\tan (c+d x)}{2 a d \left (a+b \tan ^2(c+d x)\right )} \]
1/2*arctan(b^(1/2)*tan(d*x+c)/a^(1/2))/a^(3/2)/d/b^(1/2)+1/2*tan(d*x+c)/a/ d/(a+b*tan(d*x+c)^2)
Time = 0.83 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.95 \[ \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {\frac {\arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )}{\sqrt {b}}+\frac {\sqrt {a} \tan (c+d x)}{a+b \tan ^2(c+d x)}}{2 a^{3/2} d} \]
(ArcTan[(Sqrt[b]*Tan[c + d*x])/Sqrt[a]]/Sqrt[b] + (Sqrt[a]*Tan[c + d*x])/( a + b*Tan[c + d*x]^2))/(2*a^(3/2)*d)
Time = 0.24 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.97, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 4158, 215, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sec (c+d x)^2}{\left (a+b \tan (c+d x)^2\right )^2}dx\) |
\(\Big \downarrow \) 4158 |
\(\displaystyle \frac {\int \frac {1}{\left (b \tan ^2(c+d x)+a\right )^2}d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 215 |
\(\displaystyle \frac {\frac {\int \frac {1}{b \tan ^2(c+d x)+a}d\tan (c+d x)}{2 a}+\frac {\tan (c+d x)}{2 a \left (a+b \tan ^2(c+d x)\right )}}{d}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\frac {\arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} \sqrt {b}}+\frac {\tan (c+d x)}{2 a \left (a+b \tan ^2(c+d x)\right )}}{d}\) |
(ArcTan[(Sqrt[b]*Tan[c + d*x])/Sqrt[a]]/(2*a^(3/2)*Sqrt[b]) + Tan[c + d*x] /(2*a*(a + b*Tan[c + d*x]^2)))/d
3.5.71.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^2)^(p + 1) /(2*a*(p + 1))), x] + Simp[(2*p + 3)/(2*a*(p + 1)) Int[(a + b*x^2)^(p + 1 ), x], x] /; FreeQ[{a, b}, x] && LtQ[p, -1] && (IntegerQ[4*p] || IntegerQ[6 *p])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_ )])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim p[ff/(c^(m - 1)*f) Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)^n)^ p, x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && I ntegerQ[m/2] && (IntegersQ[n, p] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])
Time = 2.22 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.83
method | result | size |
derivativedivides | \(\frac {\frac {\tan \left (d x +c \right )}{2 a \left (a +b \tan \left (d x +c \right )^{2}\right )}+\frac {\arctan \left (\frac {b \tan \left (d x +c \right )}{\sqrt {a b}}\right )}{2 a \sqrt {a b}}}{d}\) | \(55\) |
default | \(\frac {\frac {\tan \left (d x +c \right )}{2 a \left (a +b \tan \left (d x +c \right )^{2}\right )}+\frac {\arctan \left (\frac {b \tan \left (d x +c \right )}{\sqrt {a b}}\right )}{2 a \sqrt {a b}}}{d}\) | \(55\) |
risch | \(\frac {i \left (a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}+a -b \right )}{a d \left (a -b \right ) \left (a \,{\mathrm e}^{4 i \left (d x +c \right )}-b \,{\mathrm e}^{4 i \left (d x +c \right )}+2 a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{2 i \left (d x +c \right )}+a -b \right )}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a b +\sqrt {-a b}\, a +\sqrt {-a b}\, b}{\left (a -b \right ) \sqrt {-a b}}\right )}{4 \sqrt {-a b}\, d a}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i a b -\sqrt {-a b}\, a -\sqrt {-a b}\, b}{\left (a -b \right ) \sqrt {-a b}}\right )}{4 \sqrt {-a b}\, d a}\) | \(224\) |
1/d*(1/2*tan(d*x+c)/a/(a+b*tan(d*x+c)^2)+1/2/a/(a*b)^(1/2)*arctan(b*tan(d* x+c)/(a*b)^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 123 vs. \(2 (54) = 108\).
Time = 0.30 (sec) , antiderivative size = 327, normalized size of antiderivative = 4.95 \[ \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\left [\frac {4 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) - {\left ({\left (a - b\right )} \cos \left (d x + c\right )^{2} + b\right )} \sqrt {-a b} \log \left (\frac {{\left (a^{2} + 6 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (3 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left ({\left (a + b\right )} \cos \left (d x + c\right )^{3} - b \cos \left (d x + c\right )\right )} \sqrt {-a b} \sin \left (d x + c\right ) + b^{2}}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} + 2 \, {\left (a b - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}}\right )}{8 \, {\left (a^{2} b^{2} d + {\left (a^{3} b - a^{2} b^{2}\right )} d \cos \left (d x + c\right )^{2}\right )}}, \frac {2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) - {\left ({\left (a - b\right )} \cos \left (d x + c\right )^{2} + b\right )} \sqrt {a b} \arctan \left (\frac {{\left ({\left (a + b\right )} \cos \left (d x + c\right )^{2} - b\right )} \sqrt {a b}}{2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right )}{4 \, {\left (a^{2} b^{2} d + {\left (a^{3} b - a^{2} b^{2}\right )} d \cos \left (d x + c\right )^{2}\right )}}\right ] \]
[1/8*(4*a*b*cos(d*x + c)*sin(d*x + c) - ((a - b)*cos(d*x + c)^2 + b)*sqrt( -a*b)*log(((a^2 + 6*a*b + b^2)*cos(d*x + c)^4 - 2*(3*a*b + b^2)*cos(d*x + c)^2 + 4*((a + b)*cos(d*x + c)^3 - b*cos(d*x + c))*sqrt(-a*b)*sin(d*x + c) + b^2)/((a^2 - 2*a*b + b^2)*cos(d*x + c)^4 + 2*(a*b - b^2)*cos(d*x + c)^2 + b^2)))/(a^2*b^2*d + (a^3*b - a^2*b^2)*d*cos(d*x + c)^2), 1/4*(2*a*b*cos (d*x + c)*sin(d*x + c) - ((a - b)*cos(d*x + c)^2 + b)*sqrt(a*b)*arctan(1/2 *((a + b)*cos(d*x + c)^2 - b)*sqrt(a*b)/(a*b*cos(d*x + c)*sin(d*x + c))))/ (a^2*b^2*d + (a^3*b - a^2*b^2)*d*cos(d*x + c)^2)]
\[ \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\int \frac {\sec ^{2}{\left (c + d x \right )}}{\left (a + b \tan ^{2}{\left (c + d x \right )}\right )^{2}}\, dx \]
Time = 0.28 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.80 \[ \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {\frac {\tan \left (d x + c\right )}{a b \tan \left (d x + c\right )^{2} + a^{2}} + \frac {\arctan \left (\frac {b \tan \left (d x + c\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a}}{2 \, d} \]
1/2*(tan(d*x + c)/(a*b*tan(d*x + c)^2 + a^2) + arctan(b*tan(d*x + c)/sqrt( a*b))/(sqrt(a*b)*a))/d
Time = 0.56 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.06 \[ \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {\frac {\pi \left \lfloor \frac {d x + c}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (d x + c\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a} + \frac {\tan \left (d x + c\right )}{{\left (b \tan \left (d x + c\right )^{2} + a\right )} a}}{2 \, d} \]
1/2*((pi*floor((d*x + c)/pi + 1/2)*sgn(b) + arctan(b*tan(d*x + c)/sqrt(a*b )))/(sqrt(a*b)*a) + tan(d*x + c)/((b*tan(d*x + c)^2 + a)*a))/d
Time = 11.85 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.82 \[ \int \frac {\sec ^2(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {\mathrm {tan}\left (c+d\,x\right )}{2\,a\,d\,\left (b\,{\mathrm {tan}\left (c+d\,x\right )}^2+a\right )}+\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,\mathrm {tan}\left (c+d\,x\right )}{\sqrt {a}}\right )}{2\,a^{3/2}\,\sqrt {b}\,d} \]